3.53 \(\int (a+b \log (c x^n))^2 \, dx\)

Optimal. Leaf size=43 \[ x \left (a+b \log \left (c x^n\right )\right )^2-2 a b n x-2 b^2 n x \log \left (c x^n\right )+2 b^2 n^2 x \]

[Out]

-2*a*b*n*x+2*b^2*n^2*x-2*b^2*n*x*ln(c*x^n)+x*(a+b*ln(c*x^n))^2

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2296, 2295} \[ x \left (a+b \log \left (c x^n\right )\right )^2-2 a b n x-2 b^2 n x \log \left (c x^n\right )+2 b^2 n^2 x \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])^2,x]

[Out]

-2*a*b*n*x + 2*b^2*n^2*x - 2*b^2*n*x*Log[c*x^n] + x*(a + b*Log[c*x^n])^2

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rubi steps

\begin {align*} \int \left (a+b \log \left (c x^n\right )\right )^2 \, dx &=x \left (a+b \log \left (c x^n\right )\right )^2-(2 b n) \int \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=-2 a b n x+x \left (a+b \log \left (c x^n\right )\right )^2-\left (2 b^2 n\right ) \int \log \left (c x^n\right ) \, dx\\ &=-2 a b n x+2 b^2 n^2 x-2 b^2 n x \log \left (c x^n\right )+x \left (a+b \log \left (c x^n\right )\right )^2\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 33, normalized size = 0.77 \[ x \left (\left (a+b \log \left (c x^n\right )\right )^2-2 b n \left (a+b \log \left (c x^n\right )-b n\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])^2,x]

[Out]

x*((a + b*Log[c*x^n])^2 - 2*b*n*(a - b*n + b*Log[c*x^n]))

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 85, normalized size = 1.98 \[ b^{2} n^{2} x \log \relax (x)^{2} + b^{2} x \log \relax (c)^{2} - 2 \, {\left (b^{2} n - a b\right )} x \log \relax (c) + {\left (2 \, b^{2} n^{2} - 2 \, a b n + a^{2}\right )} x + 2 \, {\left (b^{2} n x \log \relax (c) - {\left (b^{2} n^{2} - a b n\right )} x\right )} \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2,x, algorithm="fricas")

[Out]

b^2*n^2*x*log(x)^2 + b^2*x*log(c)^2 - 2*(b^2*n - a*b)*x*log(c) + (2*b^2*n^2 - 2*a*b*n + a^2)*x + 2*(b^2*n*x*lo
g(c) - (b^2*n^2 - a*b*n)*x)*log(x)

________________________________________________________________________________________

giac [B]  time = 0.36, size = 88, normalized size = 2.05 \[ b^{2} n^{2} x \log \relax (x)^{2} - 2 \, b^{2} n^{2} x \log \relax (x) + 2 \, b^{2} n x \log \relax (c) \log \relax (x) + 2 \, b^{2} n^{2} x - 2 \, b^{2} n x \log \relax (c) + b^{2} x \log \relax (c)^{2} + 2 \, a b n x \log \relax (x) - 2 \, a b n x + 2 \, a b x \log \relax (c) + a^{2} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2,x, algorithm="giac")

[Out]

b^2*n^2*x*log(x)^2 - 2*b^2*n^2*x*log(x) + 2*b^2*n*x*log(c)*log(x) + 2*b^2*n^2*x - 2*b^2*n*x*log(c) + b^2*x*log
(c)^2 + 2*a*b*n*x*log(x) - 2*a*b*n*x + 2*a*b*x*log(c) + a^2*x

________________________________________________________________________________________

maple [A]  time = 0.05, size = 63, normalized size = 1.47 \[ 2 b^{2} n^{2} x -2 b^{2} n x \ln \left (c \,{\mathrm e}^{n \ln \relax (x )}\right )+b^{2} x \ln \left (c \,{\mathrm e}^{n \ln \relax (x )}\right )^{2}-2 a b n x +2 a b x \ln \left (c \,x^{n}\right )+a^{2} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^2,x)

[Out]

a^2*x+b^2*x*ln(c*exp(n*ln(x)))^2+2*b^2*n^2*x-2*b^2*n*x*ln(c*exp(n*ln(x)))+2*x*a*b*ln(c*x^n)-2*a*b*n*x

________________________________________________________________________________________

maxima [A]  time = 0.61, size = 57, normalized size = 1.33 \[ b^{2} x \log \left (c x^{n}\right )^{2} - 2 \, a b n x + 2 \, a b x \log \left (c x^{n}\right ) + 2 \, {\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} b^{2} + a^{2} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2,x, algorithm="maxima")

[Out]

b^2*x*log(c*x^n)^2 - 2*a*b*n*x + 2*a*b*x*log(c*x^n) + 2*(n^2*x - n*x*log(c*x^n))*b^2 + a^2*x

________________________________________________________________________________________

mupad [B]  time = 3.58, size = 49, normalized size = 1.14 \[ x\,\left (a^2-2\,a\,b\,n+2\,b^2\,n^2\right )+b^2\,x\,{\ln \left (c\,x^n\right )}^2+2\,b\,x\,\ln \left (c\,x^n\right )\,\left (a-b\,n\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*x^n))^2,x)

[Out]

x*(a^2 + 2*b^2*n^2 - 2*a*b*n) + b^2*x*log(c*x^n)^2 + 2*b*x*log(c*x^n)*(a - b*n)

________________________________________________________________________________________

sympy [B]  time = 0.52, size = 109, normalized size = 2.53 \[ a^{2} x + 2 a b n x \log {\relax (x )} - 2 a b n x + 2 a b x \log {\relax (c )} + b^{2} n^{2} x \log {\relax (x )}^{2} - 2 b^{2} n^{2} x \log {\relax (x )} + 2 b^{2} n^{2} x + 2 b^{2} n x \log {\relax (c )} \log {\relax (x )} - 2 b^{2} n x \log {\relax (c )} + b^{2} x \log {\relax (c )}^{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2,x)

[Out]

a**2*x + 2*a*b*n*x*log(x) - 2*a*b*n*x + 2*a*b*x*log(c) + b**2*n**2*x*log(x)**2 - 2*b**2*n**2*x*log(x) + 2*b**2
*n**2*x + 2*b**2*n*x*log(c)*log(x) - 2*b**2*n*x*log(c) + b**2*x*log(c)**2

________________________________________________________________________________________